package com.ayq.activiti.manager.publish;

import com.ayq.activiti.manager.config.ActivitiRabbitMqConfig;
import com.ayq.activiti.manager.dto.WorkFlowOpinionDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ActivitiTaskOpinionListPublish {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendActivitiTaskOpinionList(WorkFlowOpinionDTO workFlowOpinionDTO){
        rabbitTemplate.convertAndSend(ActivitiRabbitMqConfig.ACTIVITI_TASK_OPINION_LIST_EXCHANGE,ActivitiRabbitMqConfig.ACTIVITI_TASK_OPINION_LIST,workFlowOpinionDTO);
        log.info("业务历史审核意见发送消息{}",workFlowOpinionDTO);
    }
}
